import request from '@/utils/request'
import {download} from '@/utils/request'
import {getNowDate} from '@/utils/tools.js'


// 修改费率
export function editRate(data) {
  return request({
    url: '/system/acddRate/edit',
    method: 'post',
    data
  })
}


// 查询费率
export function getMaxInfo() {
  return request({
    url: '/system/acddRate/getMaxInfo',
    method: 'get'
  })
}

// 财务首页
export function getFinanceIndex() {
  return request({
    url: '/system/acddFinance/financeIndex',
    method: 'get'
  })
}

// 账单列表
export function getBillList(params) {
  return request({
    url: '/system/acddFinance/billList',
    method: 'get',
    params
  })
}

// 资金流水
export function getJournalList(params) {
  return request({
    url: '/system/acddFinance/journalAccountOfCapital',
    method: 'get',
    params
  })
}

// 用户余额
export function getShopBalance(params) {
  return request({
    url: '/system/acddFinance/shopBalance',
    method: 'get',
    params
  })
}

// 导出
export function exportFinance(params, filename) {
  return download('/system/acddFinance/export', params, `${filename}${getNowDate()}.xlsx`)
  // return request({
  //   url: '/system/acddFinance/export',
  //   method: 'post',
  //   data
  // })
}
